package com.yunyi.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yunyi.common.core.domain.AjaxResult;
import com.yunyi.system.domain.SysPathology;
import com.yunyi.system.service.SysPathologyService;
import com.yunyi.system.mapper.SysPathologyMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author Sekiro
* @description 针对表【sys_pathology】的数据库操作Service实现
* @createDate 2023-09-06 09:47:43
*/
@Service
public class SysPathologyServiceImpl extends ServiceImpl<SysPathologyMapper, SysPathology>
    implements SysPathologyService{

    @Resource
    private SysPathologyMapper pathologyMapper;

    @Override
    public AjaxResult getPathology() {
        List<SysPathology> sysPathologies = pathologyMapper.selectList(null);
        return sysPathologies == null ? AjaxResult.error("获取病理类型失败") : AjaxResult.success("获取病理类型",sysPathologies);
    }
}




